package com.tongcao.cn.algorithm.designMoel.decoration;

/**
 * @Author:tongcao
 * @Date:2019/4/3 16:55
 * Description:
 */
public class Milk extends CondimentDecorator {

    Beverage beverage;

    public Milk(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String getDesc() {
        return beverage.getDesc() + ",Milk";
    }

    @Override
    protected double cost() {
        return beverage.cost() + 0.3;
    }
}
